@layout("/common/_container.html"){
<div class="ibox-content">
    <div style="display: none">
        <input type="hidden" id="reservationsId" value="${reservationsId}">
        <input type="hidden" id="customerId" value="${customerId}">
        <input type="hidden" id="arrivalStore" value="${arrivalStore}">

    </div>
    <div class="clearfix divBox">
        <div class="col-sm-12">
            <div class="col-sm-4" style="text-align: right"><span>预约回访人</span></div>
            <div class="col-sm-8"><input type="text" class="selecteds" id="doctor" value="${doctor}" disabled="disabled"></div>
        </div>
        <div class="col-sm-12">
            <div class="col-sm-4" style="text-align: right"><span>预约回访时间</span></div>
            <div class="col-sm-8"><input type="text" id="revisitTime"  class="selecteds" onclick="laydate({istiem:true,format:'YYYY-MM-DD'})"></div>
        </div>
        <div class="col-sm-12">
            <div class="col-sm-4" style="text-align: right"><span>备注</span></div>
            <div class="col-sm-8"><textarea style="height: 100px;" name="remarks" id="remarks" class="selecteds"></textarea></div>
        </div>
        <div class="btn_box col-sm-12">
            <div class="col-sm-4"></div>
            <div class="col-sm-8">
                <button type="button" class="btn" id="submit">提交</button>
                <button type="button" class="btn" onclick="cancel()">取消</button>
            </div>
        </div>
    </div>
</div>
<script>
    submit.onclick = function() {
        var doctor= document.getElementById("doctor").value;   //医生
        var revisitTime= document.getElementById("revisitTime").value;  //预约时间
        var remarks= document.getElementById("remarks").value;   //备注
//        var content= document.getElementById("content").value;   //回访内容
        var customerId= document.getElementById("customerId").value;   //客户id
        var reservationsId= document.getElementById("reservationsId").value;   //预约id
        var arrivalStore= document.getElementById("arrivalStore").value;   //到店门诊
        $.ajax({
            url: "${ctxPath}/doctorLooked/addDoctorContent",
            type: "post",
            data: {
                doctor: doctor,
                revisitTime: revisitTime,
                remarks: remarks,
                customerId: customerId,
                reservationsId: reservationsId,
                arrivalStore:arrivalStore
            },
            success: function (data) {
                alert('操作成功!');
                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                parent.layer.close(index);
            },
            error: function (data) {
                alert('内部故障!');
            }
        });
    }

   function cancel() {
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
        parent.layer.close(index);
    }
</script>
@}
<style>
    .selecteds{ width: 50% ; height: 39px}
    .divBox>div{ margin-bottom: 20px ;}

    ul{  margin: 0;  padding: 0;  }
    input {  border: 1px solid #a9a9a9;  border-radius: 3px; }
    .ul_li > li {  float: left;  margin-right: 3%;  margin-bottom: 15px;  }
    .ul_li label {  padding-right: 9px;  }
    .records > li {  color: white;  cursor: pointer; float: left;  margin-right:3%;  }
    .btn_box button {  margin: 0;  color: white;  background: #2eadd0;  padding: 6px 30px;  font-size: 1em;  }
    .records>li>span{  font-weight: bolder;  }
</style>
